home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / bbsutil / bbsamt40.zip / BANSI.DOC next >
Text File  |  1994-04-07  |  20KB  |  543 lines

  1. Paul Wheaton of Banana Programming has done a thorough study of the
  2. conflicts between the ANSI standard and ANSI music codes.  Bloomunit
  3. wishes to strongly endorse the changes he suggests in the below
  4. BANSI.DOC, and to encourage all software authors and developers to
  5. make the suggested modifications to their ANSI music-supporting communi-
  6. cations programs by January 1, 1997.
  7.  
  8. The most notable of these suggestions is replacing the M sequence for
  9. starting ANSI music with the N sequence, which has no conflicts at all
  10. with the existing standard, and furthermore is easy to remember since it
  11. relates to the  character (Ctrl N) which closes a music string.
  12.  
  13. With cooperation and united effort, those of us who use and support BBS
  14. ANSI music can bring about a permanent change for the better, and make
  15. it more accessible for all to enjoy.
  16.  
  17. Linda Bloom
  18. Bloomunit BBS
  19. April 6, 1994
  20.  
  21. --------------------------------------------------------
  22.  
  23. BANSI.DOC
  24. copyright (c) 1994 by Paul Wheaton, Banana Programming
  25.  
  26. The ANSI-BBS industry is riddled with conflicts.  Since the true ANSI
  27. standard has not been strictly followed, a variety of variations have
  28. evolved.  Some have become popular.
  29.  
  30. This document spells out what BananaCom uses for it's terminal emulation: A
  31. mish-mash of ANSI, VT100, pseudo-ANSI and pseudo-VT100 that tries to follow
  32. what most modem services expect and use. Perhaps this will help to make
  33. BBS's and COM programs work together with a little less research and
  34. programming effort.
  35.  
  36. Terminal sends:
  37.  
  38.   All ASCII characters from 1 to 127 are sent as is.  If somebody wants to
  39.   feed a special character that comes through as a character 128 through
  40.   255, send that through too.
  41.  
  42.   ANSI terminal emulation is supposed to be a superset of the escape
  43.   sequences used by the DEC VT100 terminal.  These required that an escape
  44.   (ASCII 27) be sent followed by some other characters.  The following
  45.   keystrokes are well established:
  46.  
  47.         Keystroke             Sent
  48.  
  49.         left arrow key        ESC [ D
  50.         right arrow key       ESC [ C
  51.         up arrow key          ESC [ A
  52.         down arrow key        ESC [ B
  53.         home key              ESC [ H
  54.         end key               ESC [ K
  55.         ^home key             ESC [ L
  56.         ^page up              ESC [ M
  57.  
  58.         F1 key                ESC O P
  59.         F2 key                ESC O Q
  60.         F3 key                ESC O w
  61.         F4 key                ESC O x
  62.  
  63.                                   ^capital "oh", not a zero
  64.  
  65.   All other keys send a zero and then the BIOS scan code.  Note that most
  66.   com programs will use Alt-A through Alt-Z and Alt-1 through Alt-9 and
  67.   Alt-0.  If there happens to be keys left they will be passed through.
  68.  
  69.   Function keys are your best bet and are all passed through
  70.  
  71.               Alone     Shift      Ctrl      Alt
  72.  
  73.         F1              0  84     0  94     0 104
  74.         F2              0  85     0  95     0 105
  75.         F3              0  86     0  96     0 106
  76.         F4              0  87     0  97     0 107
  77.         F5    0  59     0  88     0  98     0 108
  78.         F6    0  60     0  89     0  99     0 109
  79.         F7    0  61     0  90     0 100     0 110
  80.         F8    0  62     0  91     0 101     0 111
  81.         F9    0  63     0  92     0 102     0 112
  82.         F10   0  64     0  93     0 103     0 113
  83.  
  84.    Some com programs use the Page Up and Page Down keys to initiate a file
  85.    transfer although this seems to be changing - these keys are of great
  86.    use to BBS's.
  87.  
  88.         Page Up           0  73
  89.         Page Down         0  81
  90.         Insert            0  82
  91.  
  92.    Note that when you press control-page-down with some terminal programs,
  93.    they send   ESC [ H ESC [ 2 J   and a lot of BBS's simply ignore that.
  94.  
  95.         ctrl-page-down    0 118
  96.         ctrl-end          0 117
  97.         ctrl-left-arrow   0 115
  98.         ctrl-right-arrow  0 116
  99.         shift-tab         0 15
  100.  
  101. Terminal receives:
  102.  
  103.   Most ANSI terminals use a screen 80x24 - with the last line reserved for
  104.   reporting the current status of the terminal program.  BananaCom uses
  105.   this standard.
  106.  
  107.   There are a few ASCII characters that have a special effect on on the
  108.   terminal:
  109.  
  110.       Dec  Hex  char   function
  111.  
  112.        7    7    ^G    beep
  113.        8    8    ^H    destructive backspace
  114.        9    9    ^I    tab - move to next tab column (8,16,24,32,40...)
  115.       10    A    ^J    line feed - move down one. Scroll up if needed
  116.       12    C    ^L    clear screen (normal attribute) & home cursor (1,1)
  117.       13    D    ^M    return - move cursor to column 1
  118.  
  119.  
  120.   Escape sequences do not have spaces in them.  Spaces have been added
  121.   here for readability.
  122.  
  123.   Anything appearing in angle brackets is a numeric variable.  The angle
  124.   brackets are not sent.
  125.  
  126.   ESC D    scroll up
  127.  
  128.     All of the text on the screen (or the scrolling region, if one is
  129.     defined) is scrolled up one line.  The bottom line is filled with
  130.     spaces colored according to the current attribute.
  131.  
  132.     Note that there is no left bracket "[" between the ESC and the 'D'.
  133.  
  134.     Example:  ESC D              scroll all text up one line
  135.  
  136.   ESC M    scroll down
  137.  
  138.     All of the text on the screen (or the scrolling region, if one is
  139.     defined) is scrolled down one line.  The top line is filled with spaces
  140.     colored according to the current attribute.
  141.  
  142.     Note that there is no left bracket "[" between the ESC and the 'M'.
  143.  
  144.     Example:  ESC M              scroll all text down one line
  145.  
  146.   ESC [ @    insert char
  147.  
  148.     Insert a space into the current line at the current cursor position.
  149.     The character at column 80 is thrown out.  The current attribute is
  150.     used for the new space.
  151.  
  152.   ESC [ <NumLines> A    cursor up
  153.  
  154.     Move the cursor up specified number of lines (default is one).
  155.  
  156.     If "ESC [ ? 6 h" has been received since last "ESC [ <var> ; <var> r"
  157.     then the cursor will not be allowed to move beyond the top of the
  158.     scrolling region.
  159.  
  160.     Example:  ESC [ 1 0 A        move up ten lines
  161.  
  162.     Example:  ESC [ A            move up one line
  163.  
  164.   ESC [ <NumLines> B    cursor down
  165.  
  166.     Move the cursor down specified number of lines (default is one).
  167.  
  168.     If "ESC [ ? 6 h" has been received since last "ESC [ <var> ; <var> r"
  169.     then the cursor will not be allowed to move beyond the bottom of the
  170.     scrolling region.
  171.  
  172.     Example:  ESC [ 1 0 B        move down ten lines
  173.  
  174.     Example:  ESC [ B            move down one line
  175.  
  176.   ESC [ <NumCols> C    cursor right
  177.  
  178.     Move the cursor right specified number of lines (default is one).
  179.  
  180.     Example:  ESC [ 1 0 C        move right ten columns
  181.  
  182.     Example:  ESC [ C            move right one column
  183.  
  184.   ESC [ <NumCols> D    cursor left
  185.  
  186.     Move the cursor left specified number of lines (default is one).  Cannot
  187.     move beyond left of screen.
  188.  
  189.     Example:  ESC [ 1 0 D        move left ten columns
  190.  
  191.     Example:  ESC [ D            move left one column
  192.  
  193.   ESC [ <Num> E    line feed
  194.  
  195.     Convert to specified number of line feeds.  If the cursor is at the
  196.     bottom of the screen (or scrolling region if one is defined) text will
  197.     be scrolled up and the bottom line will be cleared.
  198.  
  199.     Example:  ESC [ 1 0 E        convert and process as ten linefeeds
  200.  
  201.     Example:  ESC [ E            convert and process as onr linefeed
  202.                                  (why not just send ^J ?)
  203.  
  204.   ESC [ F    undefined
  205.   ESC [ G    undefined
  206.  
  207.   ESC [ <row> ; <col> H    move to
  208.  
  209.     Move cursor to this position.
  210.  
  211.     If "ESC [ ? 6 h" has been received since the last
  212.     "ESC [ <var> ; <var> r" then the cursor will be positioned relative to
  213.     the scrolling region.
  214.  
  215.     This will perform exactly the same as "ESC [ <row> ; <col> f".
  216.  
  217.     Example:  ESC [ 1 0 ; 5 H    The cursor will be positioned at row 10
  218.                                  and column 5.
  219.  
  220.     Example:  ESC [ 10 H         The cursor will be positioned at row 10
  221.                                  and column 1.
  222.  
  223.     Example:  ESC [ H            The cursor will be posi